import {get,post} from '../../utils/request.js'
const state = {
    //用来保存查询出来的栏目信息
    systems:[],
    total:0
}

const actions = {
  findAllSystem(context,list){
    get('/account/pageQuerySystemAccount',list).then(res =>{
      let response = res.data.list
      let total = res.data.total
      // console.log(response,total);
      context.commit('SET_SYSTEMS',response)
      context.commit('SET_TOTAL',total)
    })
  },
}

const mutations = {
   //修改state中的值
  SET_SYSTEMS(state,response){
    state.systems = response
  },
  SET_TOTAL(state,total){
    state.total = total
  }
}

export default {
  namespaced:true,
  state,
  actions,
  mutations
}